package com.doubledragon.tiny.ioc.xmlReader;

import com.doubledragon.tiny.ioc.BeanDefinition;
import com.doubledragon.tiny.ioc.io.ResourceLoad;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by dragon
 *
 * 抽象的BeanDefinitionReader, 提供xml读取工具类ResourceLoad
 */
public abstract class AbstractXmlBeanDefinitionReader implements BeanDefinitionReader{
    private Map<String, BeanDefinition> registry;

    private ResourceLoad resourceLoad;

    protected AbstractXmlBeanDefinitionReader(ResourceLoad resourceLoad) {
        this.registry = new HashMap<>();
        this.resourceLoad = resourceLoad;
    }

    public Map<String, BeanDefinition> getRegistry() {
        return registry;
    }

    public ResourceLoad getResourceLoad() {
        return resourceLoad;
    }
}
